<template>
  <a-modal
    :title="authorityTitle"
    :visible="authorityType"
    @cancel="authorityCancel"
    @ok="authorityOk"
  >
    <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
      <a-form-item label="员工角色">
        <a-input
            placeholder="请输入员工角色"
            v-decorator="[
                'username',
                {
                  rules: [{ required: true,message: '请输入员工角色' }]
                }
            ]"
        />
      </a-form-item>
      <a-form-item label="概述">
        <a-textarea
            placeholder="请概述一下情况"
            v-decorator="[
                'summarize',
                {
                  rules: [{ required: true,message: '请概述一下情况' }]
                }
            ]"
        />
      </a-form-item>
      <a-form-item>

      </a-form-item>
    </a-form>
  </a-modal>
</template>

<script>
export default {
    name: 'AuthorityAdd',
    props: {
      authorityType: Boolean,    //  状态
      authorityTitle: String,    //  标题
    },
    data() {
        return {
          form: this.$form.createForm(this, { name: 'coordinated' }),
        }
    },
    methods: {
        //  本身 modal 的取消
        authorityCancel() {
            this.$emit('authorityCancel', false )
        },
        //  本身 modal 的确定
        authorityOk() {
            this.$emit('authorityOk', false )
        },
    },
}
</script>

<style>

</style>
